#ifndef _EXPRESSIONTYPE_
#define _EXPRESSIONTYPE_

#include "../ValueType.h"

class ClassDefinition;

struct ExpressionType
{
    ExpressionType(ValueType iType, bool iResolveTypeAtRuntime = true, ClassDefinition* iClassDef = 0)
    {
        fType = iType;
        fClassDef = iClassDef;
        fResolveTypeAtRuntime = iResolveTypeAtRuntime;
    }

    ExpressionType* Clone()
    {
        return new ExpressionType(fType, fResolveTypeAtRuntime, fClassDef);
    }

    void UpdateValuesAndDiscardParam(ExpressionType* iNewValues)
    {
        fType = iNewValues->fType;
        fClassDef = iNewValues->fClassDef;
        fResolveTypeAtRuntime = iNewValues->fResolveTypeAtRuntime;
        delete iNewValues;
    }

    // toto se pouziva pri staticke kontrole typu, kdyz je to true, tak typova kontrola u prislusne promenne vzdy projde
    bool fResolveTypeAtRuntime;

    ValueType fType;

    // relevantni pouze pro ValueType::UserDefinedObject
    ClassDefinition* fClassDef; 
};

#endif
